#ifndef QxAbstractDatabaseIO_HPP
#define QxAbstractDatabaseIO_HPP

#include <QObject>

#include "QxDatabasePool.hpp"

class QxAbstractDatabaseIO : public QObject
{
  Q_OBJECT

public:

  QxAbstractDatabaseIO( const QSqlDatabase& database=QSqlDatabase() );
  virtual ~QxAbstractDatabaseIO();

  const QSqlDatabase& database() const;
  void setDatabase( const QSqlDatabase& );

protected Q_SLOTS:

  virtual void init()=0;

private:

  QSqlDatabase m_database;
};

#endif // QxAbstractDatabaseIO_HPP